package mapper;

import BO.AnswerBO;
import DO.FillEmptyAnswerDO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface FillEmptyAnswerQuestionMapper {


    // 根据题目id获取数据
    @Select("select id, `order`, answer from fill_empty_answer where fill_empty_id = #{id} order by `order`")
    List<AnswerBO> getAnswerByFEId(Integer id);

    // 向答案列表添加数据
    void addQuestionAnswers(List<FillEmptyAnswerDO> fillEmptyAnswerDOList);

    // 删除改题目的答案
    @Delete("delete from fill_empty_answer where fill_empty_id = #{id}")
    void deleteByFillEmptyId(Integer id);
}
